The present invention relates to an image coding apparatus and an image decoding apparatus, and more particularly to a motion image coding apparatus for coding image data in an efficient manner and a motion image decoding apparatus for decoding the coded data generated by the motion image coding apparatus, used in the field of digital image processing.
In image coding, a method of superimposing different motion image sequences has been considered. An article titled xe2x80x9cAn Image Coding Scheme Using Layered Representation and Multiple Templatesxe2x80x9d (Technical Report of IEICE, IE94-159, pp. 99-106 (1995)) describes a scheme for superimposing a motion image sequence as a background and another motion image sequence of a component or part image (e.g., video image of a human figure or fish cut out by chromakey technique) as a foreground, to generate a new image sequence.
FIG. 12 is a block diagram showing a coding apparatus and a decoding apparatus according to the conventional art. A pixel data coding portion 1201 in FIG. 12 is a portion for coding pixel data representing intensity and color difference, and a shape data coding portion 1202 is for coding shape data representing a shape of part image. These portions constitute an apparatus for coding a part image.
Shape data are used for coding pixel data. A pixel data decoding portion 1203 in FIG. 12 is a portion for decoding pixel data, and a shape data decoding portion 1204 is for decoding shape data. These portions constitute an apparatus for decoding a part image. For decoding pixel data, decoded shape data are used.
Shape data coding portion 1202 first expresses a contour of a shape using 8 directional chain codes, for example, and then codes the chain codes by Huffman coding. Pixel data coding portion 1201 codes pixel data by the international standard method of coding motion images, such as MPEG or H.261. When pixel data are divided into blocks, an arbitrary shape DCT technique or the like is employed for the block including a boundary of part image.
Each part image is decoded by a decoding apparatus, and then superimposed at a superimposing portion (not shown) using shape data, and displayed on a device like a display. For example, when superimposing a part image p (i, j) in arbitrary shape on a rectangular background image b (i, j), a display image f (i, j) is generated using shape data s (i, j) according to the following expression (1):
f(i, j)=p(i, j)s(i, j)+b(i, j)[1xe2x88x92s(i, j)]xe2x80x83xe2x80x83(1)
wherein (i, j) represents a coordinate of a pixel, and f (i, j) represents a pixel value. s (i, j) assumes the value xe2x80x9c1xe2x80x9d within a part image, and xe2x80x9c0xe2x80x9d outside the part image.
In the conventional art, however, there has not been proposed a technique for setting up spatial hierarchy for a part image. The international standard MPEG2 method realizes hierarchy (i.e., spatial hierarchy) over an entire image. In the method, data in a lower layer having low spatial resolution throughout the entire image and data in an upper layer for improving the resolution are decoded together to achieve high spatial resolution.
Accordingly, an object of the present invention is to provide an image coding apparatus and an image decoding apparatus that can realize spatial hierarchy in a part image.
To obtain shape data of low resolution, high-resolution shape data obtained by the conventional art may simply be thinned out. However, if thus obtained low-resolution image is displayed on a large-screen monitor having low resolution, the contour of a part will have stepwise appearance, which leads to deterioration in psychic image quality. The same problem arises when a low-resolution image is enlarged for display on a large-screen monitor having high resolution.
Accordingly, another object of the present invention is to provide an image coding apparatus and an image decoding apparatus that can solve the above problem.
In the present invention, an image coding apparatus and an image decoding apparatus as described in the following (1) through (10) are provided to solve the above-described problems.
(1) An image coding apparatus performing lower layer coding for coding a part image in arbitrary shape in low resolution and upper layer coding for coding the part image in high resolution, comprising: a first shape data generating portion for generating low-resolution shape data representing the arbitrary shape; a first shape data coding portion for coding the generated low-resolution shape data; a second shape data generating portion for generating high-resolution shape data representing the arbitrary shape; and a second shape data coding portion for coding the generated high-resolution shape data; wherein the low-resolution shape data are used for coding the part image in the lower layer, and the high-resolution shape data and the decoded part image data in the lower layer are used for coding the part image in the upper layer.
(2) The image coding apparatus according to (1), wherein the second shape data coding portion codes information on difference between the high-resolution shape data and the low-resolution shape data.
(3) An image coding apparatus performing lower layer coding for coding a part image in arbitrary shape in low resolution and upper layer coding for coding the part image in high resolution, wherein high resolution shape data of the part image are shared by the upper and lower layers; the apparatus comprising a high-resolution shape data generating portion for generating high-resolution shape data of the part image, and a shape data coding portion for coding the generated high-resolution shape data; wherein high resolution shape data having N levels of gradation (N is at least 2) are transformed to low-resolution shape data having M levels of gradation (M greater than N), the low-resolution shape data are used for coding the part image in the lower layer, and the high-resolution shape data and the decoded part image data in the lower layer are used for coding the part image in the upper layer.
(4) An image decoding apparatus for decoding data coded by the image coding apparatus according to (1), performing lower layer decoding for decoding a part image in arbitrary shape in low resolution and upper layer decoding for decoding the part image in high resolution; the apparatus comprising: a first shape data decoding portion for decoding low-resolution shape data, and a second shape data decoding portion for decoding high-resolution shape data; the low-resolution shape data are used for decoding the part image in the lower layer, and the high-resolution shape data and the decoded part image data in the lower layer are used for decoding the part image in the upper layer.
(5) An image decoding apparatus for decoding data coded by the image coding apparatus according to (2), performing lower layer decoding for decoding a part image in arbitrary shape in low resolution and upper layer decoding for decoding the part image in high resolution; the apparatus comprising: a first shape data decoding portion for decoding low-resolution shape data, and a second shape data decoding portion for decoding high-resolution shape data; wherein the low-resolution shape data are used for decoding the part image in the lower layer, and the high-resolution shape data and the decoded part image data in the lower layer are used for decoding the part image in the upper layer; and the second shape data decoding portion uses information on difference between the high-resolution shape data and the low-resolution shape data to obtain high resolution shape data.
(6) An image decoding apparatus for decoding data coded by the image coding apparatus according to (3), performing lower layer decoding for decoding a part image in arbitrary shape in low resolution and upper layer decoding for decoding the part image in high resolution; wherein high resolution shape data of the part image are shared by the lower and upper layers; the apparatus comprising a shape data decoding portion for decoding high-resolution shape data; wherein high resolution shape data with N levels of gradation (N is at least 2) are transformed to low-resolution shape data with M levels of gradation (M greater than N), the transformed shape data are used for decoding the part image in the lower layer, and the high-resolution shape data and the decoded part image in the lower layer are used for decoding the part image in the upper layer.
(7) The image coding apparatus according to (1), wherein the second shape data generating portion has a mode for generating high-resolution shape data corresponding to a portion of the part image coded in the lower layer.
(8) The image coding apparatus according to (2), wherein the second shape data generating portion has a mode for generating high-resolution shape data corresponding to a portion of the part image coded in the lower layer, and when the mode is selected, the second shape data coding portion codes the high-resolution shape data independent of the low-resolution shape data.
(9) An image decoding apparatus for decoding data coded by the image coding apparatus according to (7), performing lower layer decoding for decoding a part image in arbitrary shape in low resolution and upper layer decoding for decoding the part image in high resolution; the apparatus comprising: a first shape data decoding portion for decoding low-resolution shape data, and a second shape data decoding portion for decoding high-resolution shape data; wherein the low-resolution shape data are used for decoding the part image in the lower layer, and the high-resolution shape data and the decoded part image data in the lower layer are used for decoding the part image in the upper layer; and the second shape data decoding portion has a mode for decoding high-resolution shape data corresponding to a portion of the part image coded in the lower layer.
(10) An image decoding apparatus for decoding data coded by the image coding apparatus according to (8), performing lower layer decoding for decoding a part image in arbitrary shape in low resolution and upper layer decoding for decoding the part image in high resolution; the apparatus comprising: a first shape data decoding portion for decoding low-resolution shape data, and a second shape data decoding portion for decoding high-resolution shape data; wherein the low-resolution shape data are used for decoding the part image in the lower layer, and the high-resolution shape data and the decoded part image data in the lower layer are used for decoding the part image in the upper layer; the second shape data decoding portion uses information on difference between the high-resolution shape data and the low-resolution shape data to obtain high-resolution shape data; and the second shape data decoding portion has a mode for decoding high-resolution shape data corresponding to a portion of the part image coded in the lower layer, and, when the mode is selected, decodes the high-resolution shape data independent of the low-resolution shape data.